package com.yanjr.modules.sys.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.springframework.stereotype.Component;

import com.yanjr.common.Constants;
import com.yanjr.common.persistence.DataEntity;
import com.yanjr.common.persistence.Annotation.Column;
import com.yanjr.common.persistence.Annotation.Database;
import com.yanjr.common.persistence.Annotation.Table;

/**
 * @ClassName: Office 
 * @Description: 机构Entity
 * @author yanjr big123@126.com 
 * @date 2016年2月25日 下午4:52:53
 */
@Database("jeesite")
@Table("sys_office")
@Component
public class Office extends DataEntity<Office> {
	
	private static final long serialVersionUID = -6850945723309032518L;
	@Column("id")
	private String id;
	@Column("parent_id")
	private String parentId;//父级编号id
	@Column("parent_ids")
	private String parentIds; // 所有父级编号
	@Column("area_id")
	private String areaId;		// 归属区域id
	@Column("code")
	private String code; 	// 机构编码
	@Column("name")
	private String name; 	// 机构名称
	@Column("type")
	private String type; 	// 机构类型（1：公司；2：部门；3：小组）
	@Column("grade")
	private String grade; 	// 机构等级（1：一级；2：二级；3：三级；4：四级）
	@Column("address")
	private String address; // 联系地址
	@Column("zip_code")
	private String zipCode; // 邮政编码
	@Column("master")
	private String master; 	// 负责人
	@Column("phone")
	private String phone; 	// 电话
	@Column("fax")
	private String fax; 	// 传真
	@Column("email")
	private String email; 	// 邮箱
	@Column("create_by")
	private String createBy;
	@Column("create_date")
	private Date createDate;
	@Column("update_by")
	private String updateBy;
	@Column("update_date")
	private Date updateDate;
	@Column("remarks")
	private String remarks;
	@Column("del_flag")
	private String delFlag = Constants.DEL_FLAG_NORMAL;
	
	private List<User> userList = new ArrayList<>();   // 拥有用户列表
//	private List<Office> childList = new ArrayList<>();// 拥有子机构列表

	public Office(){
		super();
	}
	
	public Office(String id){
		this();
		this.id = id;
	}

	public String getParentIds() {
		return parentIds;
	}

	public void setParentIds(String parentIds) {
		this.parentIds = parentIds;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getGrade() {
		return grade;
	}

	public void setGrade(String grade) {
		this.grade = grade;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getZipCode() {
		return zipCode;
	}

	public void setZipCode(String zipCode) {
		this.zipCode = zipCode;
	}

	public String getMaster() {
		return master;
	}

	public void setMaster(String master) {
		this.master = master;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getFax() {
		return fax;
	}

	public void setFax(String fax) {
		this.fax = fax;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

//	public List<User> getUserList() {
//		return userList;
//	}
//
//	public void setUserList(List<User> userList) {
//		this.userList = userList;
//	}
//
//	public List<Office> getChildList() {
//		return childList;
//	}
//
//	public void setChildList(List<Office> childList) {
//		this.childList = childList;
//	}

	public String getParentId() {
		return parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

	public String getAreaId() {
		return areaId;
	}

	public void setAreaId(String areaId) {
		this.areaId = areaId;
	}

	public String getCreateBy() {
		return createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getUpdateBy() {
		return updateBy;
	}

	public void setUpdateBy(String updateBy) {
		this.updateBy = updateBy;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public String getDelFlag() {
		return delFlag;
	}

	public void setDelFlag(String delFlag) {
		this.delFlag = delFlag;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public List<User> getUserList() {
		return userList;
	}

	public void setUserList(List<User> userList) {
		this.userList = userList;
	}

	
	
}